package com.qianying.utils;

public class HttpServletRequestUtils {
        public static Long GetHttpServletRequestUserId(javax.servlet.http.HttpServletRequest request) {
        Object userIdObj = request.getAttribute("userId");
        if (userIdObj == null) {
            return null;
        }

        Long userId;
        try {
            userId = Long.valueOf(userIdObj.toString());
            return userId;
        } catch (NumberFormatException e) {
            return null;
        }
    }

}
